In [1]:
from sympy.physics.hydrogen import R_nl
from sympy.functions.special.spherical_harmonics import Ynm
from sympy import *
Define some variables, radial, polar, azimuthal, time, and two frequencies:
In [2]:
var("r theta phi t w1 w2")
Out[2]:
In [3]:
R_nl(1, 0, r, 1) # the n = 1, l = 0 radial function
Out[3]:
In [4]:
Ynm(1,0,theta,phi).expand(func=True) # the l = 0, m = 0 spherical harmonic
Out[4]:
Write the equation for the $|nlm\rangle = |100\rangle$ state. Use the sympy method .expand(func=True)
to convert to the actual expression. To create this state, we combine the Radial function and the Ylm function. Make sure to set n, l, and m to the correct values. The fourth argument to R_nl
is Z
which we set to 1 since we are talking about a 1-proton nucleus.
The combination of R_nl and Ynm should look like the following (replace N, L, and M with the appropriate values):
R_nl(N, L, r, 1)*Ynm(L, M, theta, phi).expand(func=True)
In [5]:
# this is the |100> state:
psi100 = R_nl(1, 0, r, 1)*Ynm(0,0,theta,phi).expand(func=True)
In [6]:
psi100 # check to see how it looks as an expression
Out[6]:
Remember spherical coordinate integrals of function $f(r,\theta,\phi)$ over all space look like: $$\int_0^\infty\int_0^\pi\int_0^{2\pi}r^2\sin(\theta)drd\theta d\phi \,\,f(r,\theta,\phi)$$ so you alwasy need to add a factor of r**2*sin(theta)
and then integrate r
from 0 to infinity, theta
from $0-\pi$ and phi
from $0-2\pi$. As a check, you should integrate the square of the psi100
wavefunction over all space to see that it equals 1 (i.e. it is normalized)
In [7]:
integrate(r**2*sin(theta) * (psi100)**2 ,(r,0,oo),(theta,0,pi),(phi,0,2*pi))
Out[7]:
In [8]:
psi210 = R_nl(2, 1, r, 1)*Ynm(1,0,theta,phi).expand(func=True)
In [9]:
psi210 # check how it looks
Out[9]:
Note, if you compare these to listed solutions (for example at http://hyperphysics.phy-astr.gsu.edu/hbase/quantum/hydwf.html#c3) you see that there are not any factors of $a_0$. This is because the R_nl
function is defined in units of $a_0$. $a_0$ is the Bohr Radius: http://en.wikipedia.org/wiki/Bohr_radius
In [10]:
expect = integrate(r**2*sin(theta)* (r*cos(theta)) * (psi100*psi100),(r,0,oo),(theta,0,pi),(phi,0,2*pi))
In [11]:
expect
Out[11]:
No surprise, the average z position of the electron in the hydrogen atom is 0.
In [12]:
psi = 1/sqrt(2)*(psi100*exp(1j*w1*t) + psi210*exp(1j*w2*t))
psi_conj = 1/sqrt(2)*(psi100*exp(-1j*w1*t) + psi210*exp(-1j*w2*t))
In [17]:
expect2 = integrate(r**2*sin(theta)* (r*cos(theta)) * psi*psi_conj,(r,0,oo),(theta,0,pi),(phi,0,2*pi))
In [24]:
plot(re(expect2.subs({w2:2, w1:1})),(t,0,10))
Out[24]:
We need to interpret this result. First you should show that this expression is simply a constant amplitude factor times $\cos((w2-w1)t)$, in other words $\langle z \rangle$ oscillates at frequency w2-w1
.
Explore other combinations of states and draw conclusions about the z behavior from the results. You may not be able to get these expressions to simplify, but the important thing is to look for the time dependence and simplify that part.
Hints for interpreting your results:
In [30]:
psi320 = R_nl(3, 2, r, 1)*Ynm(2,0,theta,phi).expand(func=True)
psi2 = 1/sqrt(2)*(psi100*exp(1j*w1*t) + psi310*exp(1j*w2*t))
psi2_conj = 1/sqrt(2)*(psi100*exp(-1j*w1*t) + psi310*exp(-1j*w2*t))
In [33]:
expect3 = integrate(r**2*sin(theta)* (r*cos(theta)) * psi2*psi2_conj,(r,0,oo),(theta,0,pi),(phi,0,2*pi))
In [34]:
expect3
Out[34]:
In [29]:
plot(re(expect3.subs({w2:2, w1:1})),(t,0,10))
Out[29]:
In [ ]: